// Decompiled by DJ v3.7.7.81 Copyright 2004 Atanas Neshkov  Date: 2007-9-15 18:54:15


// Source File Name:   p4.java

package com.zelix;

import java.awt.*;
import javax.swing.JPanel;

public class p4 extends JPanel
{

    Image a;
    int b;
    int c;
    boolean d;

    public p4(Image image, Image image1)
    {
        a = image;
        b();
        d = true;
        boolean flag = prepareImage(a, this);
        if(!flag)
        {
            a = image1;
            d = false;
            b();
            prepareImage(a, this);
        }
        b = a.getWidth(this);
        c = a.getHeight(this);
        repaint();
    }

    public Dimension getMinimumSize()
    {
        return getPreferredSize();
    }

    public Dimension getPreferredSize()
    {
        return new Dimension(b, c);
    }

    public boolean a()
    {
        return d;
    }

    private void b()
    {
        MediaTracker mediatracker = new MediaTracker(this);
        mediatracker.addImage(a, 0);
        try
        {
            mediatracker.waitForID(0);
        }
        catch(InterruptedException _ex) { }
    }

    public void paint(Graphics g)
    {
        update(g);
    }

    public void update(Graphics g)
    {
        g.drawImage(a, 0, 0, b, c, this);
    }
}